﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core.CustomTypeProviders;
using System.Linq.Dynamic.Core;
using System.Text;
using System.Threading.Tasks;

namespace YY.Admin.Core.SqlSugar
{
    public class SqlSugarTypeProvider : DefaultDynamicLinqCustomTypeProvider
    {
        public SqlSugarTypeProvider(bool cacheCustomTypes = true) : base(ParsingConfig.Default, cacheCustomTypes)
        {
        }

        public override HashSet<Type> GetCustomTypes()
        {
            var customTypes = base.GetCustomTypes();
            customTypes.Add(typeof(SqlFunc));
            return customTypes;
        }
    }
}
